
// 渲染优惠券列表
(function(){
    fetch('http://chst.vip:1234/api/getcoupon')
    .then(response => {
        return response.json()
    }).then(res => {
        let data = res.result
        console.log(data);
        let ele = ''
        data.forEach(item => {
            ele += `
            <a href="couponproduct.html?couponid=${item.couponId}">
                <img src="${item.couponImg}" alt="">
                <p>${item.couponTitle}</p>
            </a>
            `
        });
        $('.info').html(ele)
    })
})();